package com.xuecheng.media.task;

import javax.lang.model.SourceVersion;
import java.util.Timer;
import java.util.TimerTask;

/**
 * @author yellow Doctor
 * @date 2025-11-20
 * @desc https://blog.csdn.net/hekai7217
 */
public class Demo02 {

    public static void main(String[] args) {

        Timer timer = new Timer();
        timer.schedule(new TimerTask(){
            @Override
            public void run() {
                //TODO：something
                System.out.println(" 定期中==============> 中彩票  " );
            }
        }, 1000, 2000);  //1秒后开始调度，每2秒执行一次

    }
}
